﻿<%@ Page Title="Gallery | Towns" Language="C#" MasterPageFile="~/Photos.Master" AutoEventWireup="true" CodeBehind="GalleryTemplate.aspx.cs" Inherits="MusaDor.Gallery.Towns" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
<script type="text/javascript" src="../Scripts/klass.min.js"></script>
<script type="text/javascript" src="../Scripts/code.photoswipe-3.0.5.js"></script>
<link href="../Styles/photoswipe.css" type="text/css" rel="stylesheet" />
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <div id="GalleryContent">
        <div id="Images">
            <asp:ListView ID="GalleryList" DataKeyNames="ArticleID" runat="server" DataSourceID="GalleryListDataSource">
                <LayoutTemplate>
                    <ul id="Gallery" class="gallery">
                        <asp:PlaceHolder ID="itemPlaceholder" runat="server" />
                    </ul>
                </LayoutTemplate>
                <ItemTemplate>
                    <li><a href='../Images/Gallery/FullImages/<%# Eval("ImageFull")%>'><img src="../Images/Gallery/PreviewImages/<%# Eval("ImagePreview")%>" alt="<%# Eval("Title") %>" /></a></li>
                </ItemTemplate>        
                <EmptyDataTemplate>
                </EmptyDataTemplate>    
            </asp:ListView>
        </div>
    </div>
<asp:SqlDataSource ID="GalleryListDataSource" runat="server" 
        ConnectionString="<%$ ConnectionStrings:ConnectionString %>" 
        SelectCommand="SELECT [CategoryID], [ArticleID], [Title], [ImagePreview], [ImageFull], [Approved] FROM [md_Articles] WHERE (([Approved] = @Approved) AND ([CategoryID] = @CategoryID))" >
    <SelectParameters>
        <asp:Parameter DefaultValue="False" Name="Approved" Type="Boolean" />
        <asp:Parameter DefaultValue="10" Name="CategoryID" Type="Int32" />
    </SelectParameters>
    </asp:SqlDataSource>
</asp:Content>
